#pragma once
#include "..\DXAMLCommon.h"
#include "CloneStringPtr.h"
#include "ReferenceCountedBase.h"



class XmlReaderInput :
	public ReferenceCountedBase,
	public IUnknown
{
public: 
	XmlReaderInput(struct IMalloc *);
	virtual ~XmlReaderInput();

	virtual HRESULT __stdcall QueryInterface(const struct _GUID &, void * *);
	virtual unsigned long __stdcall AddRef();
	virtual unsigned long __stdcall Release();

	struct IUnknown * GetInputStream();
	struct StringPtr * GetEncodingName();
	XUINT32 GetEncodingCodePage();
	bool IsEncodingHint();
	bool IsEncodingSpecified();
	struct StringPtr * GetBaseUri();
	void SetInputStream(struct IUnknown *);
	void SetEncodingName(const wchar_t *);
	void SetEncodingCodePage(XUINT32);
	void SetEncodingHint(bool);
	void SetBaseUri(const wchar_t *);
private: 
	struct IUnknown * m_pInputStream;
	struct CloneStringPtr m_strEncodingName;
	XUINT32 m_nEncodingCodePage;
	bool m_fEncodingHint;
	struct CloneStringPtr m_strBaseUri;
};